package com.wr.service.consumer;

import com.wr.service.consumer.fallback.RedisServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "itoken-service-redis",fallback = RedisServiceFallback.class)
public interface RedisService {

    @RequestMapping(value = "/redis/put",method = RequestMethod.POST)
    public String put(@RequestParam("key")String key, @RequestParam("value")String value, @RequestParam("seconds")long seconds);

    @RequestMapping(value = "/redis/get",method = RequestMethod.GET)
    public String get(@RequestParam("key")String key);
}
